package cn.qingyun.gis.modules.scenes.response;

import cn.qingyun.gis.modules.handle.JsonbToEntityHandler;
import cn.qingyun.gis.modules.scenes.entity.*;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @author sgc
 * @date 2024年04月28日 16:19
 */
@Data
public class TaskDetailResponse {
    // -------------- 主表字段 ---------------
    @ApiModelProperty(value = "唯一标识")
    private String id;

    @JsonIgnore
    private String proofreadId;

    @ApiModelProperty(value = "高德id")
    private String poiId;

    @ApiModelProperty(value = "场景类型（沿街商铺 + 五大场景）")
    private String type;

    @ApiModelProperty(value = "业务地市")
    private String regionCity;

    @ApiModelProperty(value = "业务地市码")
    private String regionCityCode;

    @ApiModelProperty(value = "业务区县")
    private String regionDis;

    @ApiModelProperty(value = "业务网格")
    private String gridName;

    @ApiModelProperty(value = "poi名称")
    private String poiName;

    @ApiModelProperty(value = "结构化地址")
    private String address;

    @ApiModelProperty(value = "随访状态")
    private Integer kwState;

    // -------------- 勘误表字段 ---------------
    @ApiModelProperty(value = "poi名称")
    private String kwPoiName;

    @ApiModelProperty(value = "poi地址")
    private String kwPoiAddress;

    @ApiModelProperty(value = "场景类型")
    private String kwType;

    @ApiModelProperty(value = "老板姓名")
    private String kwBossName;

    @ApiModelProperty(value = "老板电话以及手机号码")
    private String kwBossTel;


    @ApiModelProperty(value = "老板月均消费")
    private String kwBossConsume;

    @ApiModelProperty(value = "所属运营商")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Integer belongOperator;

    @ApiModelProperty(value = "(优惠)到期时间")
    private String expireDate;

    @ApiModelProperty(value = "行政地市")
    private String kwCity;

    @ApiModelProperty(value = "行政区县")
    private String kwDis;

    @ApiModelProperty(value = "行政乡镇")
    private String kwTown;

    @ApiModelProperty(value = "行政街道")
    private String kwRoad;

    @ApiModelProperty(value = "行政道路门牌号")
    private String kwRoadNo;

    @ApiModelProperty(value = "随访工号")
    private String kwPhone;

    @ApiModelProperty(value = "poi归属工号")
    private String belongKwPhone;

    @ApiModelProperty(value = "渠道编码")
    private String channelCode;

    @ApiModelProperty(value = "角色名称")
    private String roleName;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "亲属信息 -- 后端用")
    private String kwRelativesInfo;

    @ApiModelProperty(value = "亲属信息列表")
    private List<KwRelativesDto> kwRelationInfoList;

    @ApiModelProperty(value = "商机内容(手动录入)")
    private String businessContent;

    @ApiModelProperty(value = "商机内容列表(录音识别)")
    private String contentList;

    @ApiModelProperty(value = "商机内容列表(录音识别)")
    private List<BusContentDto> businessContentList;

    // -------------- 附件表字段 ---------------
    @ApiModelProperty(value = "附件列表")
    private List<AppendixResponse> appendixInfos;

    // -------------- base64字符串列表 ---------------
    @ApiModelProperty(value = "base64字符串列表")
    private List<ImageResponse> base64Infos;
    @ApiModelProperty(value = "经度")
    private Double poiLng;
    @ApiModelProperty(value = "纬度")
    private Double poiLat;

    @ApiModelProperty(value = "经营状态")
    private Integer businessState;

    @ApiModelProperty(value = "门牌号---路")
    private String houseRoad;

    @ApiModelProperty(value = "门牌号---号")
    private String houseNumber;

    @ApiModelProperty(value = "店主关联运营商")
    private Integer dzBelongOperator;
    /**
     * 网络是否覆盖 1是 0否
     */
    @ApiModelProperty(value = "网络是否覆盖")
    private Integer isZoneCode;

    /**
     * 网络是否覆盖是否准确 1是 0否
     */
    @ApiModelProperty(value = "网络是否覆盖是否准确")
    private Integer isZoneCodeAccurate;
    /**
     *是否有意向 1是 0否
     */
    @ApiModelProperty(value = "是否有意向")
    private Integer isIntention;

    @ApiModelProperty(value = "意向时间")
    private String intentionDate;

    @ApiModelProperty(value = "设备信息")
    private KdDeviceInfo kdDeviceInfo;

    @ApiModelProperty(value = "平台信息实体")
    private PlatformInfo platformInfo;

    @ApiModelProperty(value = "备注")
    private InterviewRemark interviewRemark;

    @ApiModelProperty(value = "是否是建筑")
    private Integer isBuild;

    @ApiModelProperty(value = "归属建筑poiId")
    private String belongBuildId;

    @ApiModelProperty(value = "商家电话")
    private String telephone;

    @ApiModelProperty(value = "建筑信息")
    private BuildInfo buildInfo;

    @ApiModelProperty(value = "是否是金牌建筑")
    private Integer isGoldBuild;

    @ApiModelProperty(value = "建筑结构")
    private BuildStructure buildStructure;

    @ApiModelProperty(value = "联系信息")
    private RelatedInfo relatedInfo;

    @ApiModelProperty(value = "商机（意向业务）")
    private IntentionInfo intentionInfo;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date kwTime;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date draftUpdateTime;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date kwTimeStart;

    @ApiModelProperty(value = "勘误总数")
    private int kwPoiTotal;

    @ApiModelProperty(value = "未勘误总数")
    private int unKwPoiTotal;

    @ApiModelProperty(value = "宽带渗透率")
    private double kdRate;

    @ApiModelProperty(value = "链路id")
    private String chainId;

    @ApiModelProperty(value = "存量泛渠道")
    @TableField(typeHandler = JsonbToEntityHandler.class)
    private PanChannelInfo panChannelInfo;

    @ApiModelProperty(value = "摸排步骤")
    private Integer step;
}
